<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:c="http://java.sun.com/jsp/jstl/core">

    <p class="navLinkSpacing">
        <h:link id="homeLink" styleClass="navLink" outcome="/home" value="Home"/>
    </p>
    <p class="navLinkSpacing">
        <h:link id="contactLink" styleClass="navLink" outcome="/contactUs" value="Contact Us"/>
    </p>

    <c:if id="userNotLoggedIn" test="#{!authentication.userLoggedIn}">
        <p class="navLinkSpacing">
            <h:link id="loginLink" styleClass="navLink" outcome="/login" value="Login"/>
        </p>
    </c:if>

    <c:if id="userLoggedIn" test="#{authentication.userLoggedIn}">
        <h:form id="navForm" styleClass="navForm">
            <p class="navLinkSpacing">
                <h:link id="addParentLink" styleClass="navLink" outcome="/addParent"
                        value="Add Parent"/>
            </p>
            <p class="navLinkSpacing">
                <h:link id="addChildLink" styleClass="navLink" outcome="/addChild" value="Add Child"/>
            </p>
            <p class="navLinkSpacing">
                <h:link id="signInChildLink" styleClass="navLink" outcome="/signInChild"
                        value="Sign In Child"/>
            </p>
            <c:if id="childSignedIn" test="#{home.childSignedIn}" >
                <p class="navLinkSpacing">
                    <h:link id="signOutChildLink" styleClass="navLink" outcome="/signOutChild"
                            value="Sign Out Child"/>
                </p>
            </c:if>
            <p class="navLinkSpacing">
                <h:commandLink id="logoutLink" styleClass="navLink" value="Logout"
                               action="#{authentication.performLogout}" />
            </p>
            <p class="navLinkSpacing">
                <h:link id="dateReportLink" styleClass="navLink" outcome="/reportByDate"
                        value="Generate Date Report"/>
            </p>
            <p class="navLinkSpacing">
                <h:link id="ageReportLink" styleClass="navLink" outcome="/reportByAge"
                        value="Generate Age Report"/>
            </p>
            <p class="navLinkSpacing">
                <h:link id="parentReportLink" styleClass="navLink" outcome="/reportByParent"
                        value="Generate Parent Report"/>
            </p>
            <p class="navLinkSpacing">
                <h:link id="childReportLink" styleClass="navLink" outcome="/reportByChild"
                        value="Generate Child Report"/>
            </p>
        </h:form>
    </c:if>
    <p class="navLinkSpacing">
        <h:link id="aboutUsLink" styleClass="navLink" outcome="/aboutUs" value="About Us"/>
    </p>
</html>